



#include "Poller.h"
#include "Channel.h"


Poller::Poller(EventLoop* loop){
    ownerLoop_ = loop;
}


bool Poller::hasChannel(Channel* channel) const{
    if (channel == nullptr) return false;
    auto currentChannel = channels_.find(channel->fd());
    return currentChannel != channels_.end() && currentChannel->second == channel;
    
}